package com.zsrt.javaweb.ch01;

public class ArithmeticCalculateImpl implements ArithmeticCalculate {

	public int add(int x, int y) {
		
		System.out.println("进入add方法... 方法的参数为x="+x +",y="+y);
		int sum = x + y;
		System.out.println("add方法的返回值为:"+sum);
		return sum;
	}

	public int sub(int x, int y) {
		System.out.println("进入sub方法... 方法的参数为x="+x +",y="+y);
		int sub = x -y;
		System.out.println("sub方法的返回值为:"+sub);
		return sub;
	}

	public int mul(int x, int y) {
		System.out.println("进入mul方法... 方法的参数为x="+x +",y="+y);
		int mul = x * y;
		System.out.println("mul方法的返回值为:"+mul);
		return mul;
	}

	public int div(int x, int y) {
		System.out.println("进入div方法... 方法的参数为x="+x +",y="+y);
		int div = x/y;
		System.out.println("div方法的返回值为:"+div);
		return div;
	}

}
